package com.clear.creational;

/**
 * 懒汉单例
 */
public class LazySingleton {
    private static LazySingleton INSTANCE;

    private LazySingleton() {
    }

    public static LazySingleton getINSTANCE() {
        if (null == INSTANCE) {  // todo 如果多个线程同时达到，可能就会打破单例
            INSTANCE = new LazySingleton();
        }
        return INSTANCE;
    }
}
